<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:p="http://primefaces.org/ui">
     
      
<h:body>
	<div class="container" style=" width: 960px;     margin: 0 auto;     border-style:solid; background-color: lightblue; ">
	   	<div class="content" style="width: 800px;margin: auto;	">
	       <h2>Pagina di Test: scegliere la classe da testare </h2>
	       <p><b>( il risultato dei test è mostrato anche nel log di Glassfish )</b></p>
	       <p>Si consiglia di effettuare i test dopo aver svuotato tutte le tabelle del DB con il seguente comando SQL</p>
	       <p style="font-family: monospace;font-size: 10px;">
	       		SET FOREIGN_KEY_CHECKS = 0;
	       		TRUNCATE `BOOKING`;TRUNCATE `custom_packet`;TRUNCATE `default_packet`;TRUNCATE `EXCURSION`;TRUNCATE `FLIGHT`;TRUNCATE `HOTEL`;TRUNCATE `INVITE`;
				TRUNCATE `PACKET`;TRUNCATE `packet_products`;TRUNCATE `PLACE`;TRUNCATE `PRODUCT`;TRUNCATE `SEQUENCE`;TRUNCATE `USER`;TRUNCATE `user_group`;
	       </p>
	       	<h:form>
				  <p:commandButton value="ProductManagerBean" style="font-size: 14px;" action="#{product_manager_test.runTests()}"></p:commandButton>
				  <p:commandButton value="PacketManagerBean"  style="font-size: 14px;" action="#{packet_manager_test.runTests()}"></p:commandButton>
				  <p:commandButton value="BookingManagerBean"  style="font-size: 14px;" action="#{booking_manager_test.runTests()}"></p:commandButton>
				  <p:commandButton value="InviteManagerBean" style="font-size: 14px;"  action="#{invite_manager_test.runTests()}"></p:commandButton>			  
			</h:form>
			<p:inputTextarea value="#{product_manager_test.log}" rows="50" cols="90" rendered="#{test_bean.prod}"></p:inputTextarea>
			<p:inputTextarea value="#{packet_manager_test.log}" rows="50" cols="90" rendered="#{test_bean.pack}"></p:inputTextarea>
			<p:inputTextarea value="#{booking_manager_test.log}" rows="50" cols="90" rendered="#{test_bean.book}"></p:inputTextarea>
			<p:inputTextarea value="#{invite_manager_test.log}" rows="50" cols="90" rendered="#{test_bean.inv}"></p:inputTextarea>
		</div> 
	</div>
</h:body>
</html>
